package org.wendu.wdoa.security.user.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.wendu.wdoa.common.page.PageParam;
import org.wendu.wdoa.security.role.dto.RoleQueryDto;
import org.wendu.wdoa.security.user.dto.roleDto;
import org.wendu.wdoa.security.user.model.User;

import java.util.List;

@Mapper
public interface UserDao {
    public List<User> findUserList(PageParam pageParam);

    @Select("select * from t_role")
    List<roleDto> findUserFun();
    @Select("select ro_id from t_ur where u_id = #{u_id}")
    List<Integer> findUserFunIds(String u_id);
    @Delete("delete from t_ur where u_id = #{u_id}")
    void deleteUserFuns(String u_id);

    void insertUserFuns(@Param("u_id") String u_id, @Param("ro_ids") Integer[] ro_ids);
}
